package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.XMLGatherer;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.query.resultparser.QuerySingleUserResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class LoginQuery extends Query {

	private String _username;
	private String _password;

	public LoginQuery(XMLGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.LOGIN_URL, getAPIKey(), this._username, this._password);
	}

	public String getUsername(){
		return this._username;
	}
	
	public void setUsername(String username){
		this._username = username;
	}
	
	public void setPassword(String password){
		this._password = password;
	}
	
	
	@Override
	protected IQueryResultParser getResultParser() {
		return new QuerySingleUserResultParser();

	}

	
}
